package com.wf.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wf.controller.dto.UserPasswordDTO;
import com.wf.entity.Course;
import com.wf.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 *
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    // 更新密码
    @Update("update sys_user set password = #{newPassword} where username = #{username} and password = #{password}")
    int updatePassword(UserPasswordDTO userPasswordDTO);

//    Page<User> findPage(Page<User> page, @Param("username") String username, @Param("email") String email, @Param("address") String address);
      Page<Course> searchCourseTableData (Page<Course> page,  @Param("id") Integer id);


//      Page<Course> searchCourseTableDataByStudent (Page<Course> page,  @Param("id") Integer id);
      List<Integer> searchCourseTableDataByStudent ( @Param("id") Integer id);


}
